package com.evildog.workspace.invest.application.model;

import com.evildog.workspace.dependencies.mybatis.annotation.QueryCondition;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryTableLogic;
import com.evildog.workspace.dependencies.mybatis.annotation.QueryUserCondition;
import com.evildog.workspace.dependencies.mybatis.enums.ComparisonOperatorsEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * <p>
 * bill列表查询参数，可以使用QueryCondition.class
 * </p>
 *
 * @author evildog
 * @since 2020-08-06
 */
@Data
@Accessors(chain = true)
@ApiModel(value="BillList 查询参数")
@QueryTableLogic
@QueryUserCondition
public class BillListParam implements Serializable {


    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "类型 0 收入 1 支出")
    @QueryCondition
    private Integer type;

    @ApiModelProperty(value = "账单类型id")
    @QueryCondition
    private Long typeId;

    @ApiModelProperty(value = "价值")
    @QueryCondition
    private Integer worth;

    @ApiModelProperty(value = "开始时间")
    @QueryCondition(fieldName = "date",operator = ComparisonOperatorsEnum.GE)
    private LocalDate startDate;

    @ApiModelProperty(value = "结束时间")
    @QueryCondition(fieldName = "date",operator = ComparisonOperatorsEnum.LE)
    private LocalDate endDate;


}
